import React, { useState,useEffect } from 'react';
function TestHooks() {
  const [count, setCount] = useState(0);
  useEffect(() => {
    // 使用浏览器的 API 更新页面标题
    document.title = `You clicked ${count} times`;
  });
  return (
    <div className="count-box">
      <h1 style={{fontSize:16}}>点了{count}次</h1>
      <button onClick={() => {setCount(count + 1);}}>Click</button>
    </div>
  );
}
export default TestHooks;
